import React, { Component } from 'react';
import Swiper from "swiper/dist/js/swiper.js"
import './Swiper.css'


class swiper extends Component{
    constructor(){
        super();
    }
    render(){
        return(
            <div className="swiper">
                <div className="swiper-container">
                    <div className="swiper-wrapper">
                        <div className="swiper-slide"><img src="./../img/1.jpg" alt=""/></div>
                        <div className="swiper-slide"><img src="./../img/2.jpg" alt=""/></div>
                    </div>
                    <div className="swiper-pagination"></div>
                </div>
            </div>
        )
    }
    componentDidMount(){
        var swiper = new Swiper('.swiper-container', {
            loop:true,
            centeredSlides: true,
            autoplay: {
                delay: 2500,
                disableOnInteraction: false,
            },
            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            }
        });
    }

}


export default swiper;